
SET( LUA_PATAMETERS_H
			config.h
			luaParameters.h
			)
SET( LUA_PATAMETERS_SRC ./src/luaParameters.cpp
						./src/luaParametersSweep.cpp
						./src/luaParameters-GlobalStateFunctions.cpp
						global.cpp
						./src/luaExpression.cpp
						./src/luaPointExpression.cpp
)


INCLUDE_DIRECTORIES(  ${LUAEx_SOURCE_DIR} )
INCLUDE_DIRECTORIES(  ${LUA_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${MYLIB_DIR} )
INCLUDE_DIRECTORIES(  ${SOL2_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${Boost_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${MYLIB_LOG_INCLUDE_DIR} )

set(LUA_PATAMETERS_ALLFILES ${LUA_PATAMETERS_H} ${LUA_PATAMETERS_SRC})

if(LUA_PATAMETERS_STATIC_LIB)
	ADD_LIBRARY(luaParameters STATIC ${LUA_PATAMETERS_ALLFILES})
else(LUA_PATAMETERS_STATIC_LIB)
	ADD_LIBRARY(luaParameters SHARED ${LUA_PATAMETERS_ALLFILES})
    if(WIN32)
        add_definitions( -DLUA_PARAMETERS_DLL )
        add_definitions( -DluaParameters_EXPORTS)
        add_definitions( -DLUA_STATE_DLL )        
    endif(WIN32)
endif(LUA_PATAMETERS_STATIC_LIB)

add_dependencies(luaParameters luaState)
add_definitions(-DUNICODE -D_UNICODE)

# 检查是否为 MSVC 编译器
if(MSVC)
    set(luaState_LIBRARY luaState)
endif()
target_link_libraries(luaParameters ${luaState_LIBRARY} ${LUA_LIBRARY})
target_link_libraries(luaParameters ${MYLIB_LOG_LIBRARY})
target_link_libraries(luaParameters ${Boost_FILESYSTEM_LIBRARY}		
							        ${Boost_REGEX_LIBRARY}
							        ${Boost_SYSTEM_LIBRARY} 
							      )

SET_TARGET_PROPERTIES(luaParameters PROPERTIES PREFIX "")
collect_library(luaParameters)
